package com.zhang.common.model;

import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * ElasticSearch用于保存Sku信息的数据实体
 * @author hongmizfb
 * @date 2023/10/22
 */
@Data
public class SkuEsModel {
    private Long skuId;
    private Long spuId;
    private String skuTitle;
    private Long businessId;
    private BigDecimal skuPrice;
    /**
     * sku的默认图片
     */
    private Long skuDefaultImg;
    /**
     * 销量
     */
    private Long saleCount;
    /**
     * 是否拥有库存
     */
    private Boolean hasStock;
    /**
     * 热度评分
     */
    private Long hotScore;

    private Long brandId;

    private Long categoryId;

    private String brandName;

    private Long brandImg;

    private String categoryName;

    private List<Attrs> attrs;

    private LocalDateTime upTime;

    @Data
    public static class Attrs {
        private Long attrId;
        private String attrName;
        private String attrValue;
    }
}
